package index_service

import "hytx_media/models"

func GetNumber(mediaUserId int) (map[string]interface{}) {
	//粉丝数
	followNum := models.GetFollowNum(mediaUserId)
	//阅读量
	reading := models.GetReadingNum(mediaUserId)
	//分享量
	shareNum := models.GetShareNum(mediaUserId)
	//文章发布数
	articleNum := models.GetArticleNum(mediaUserId)
	data := make(map[string]interface{})

	data["follow"] = followNum
	data["reading"] = reading
	data["share"] = shareNum
	data["article"] = articleNum

	return data

}

func GetNotice() ([]*models.MessageResult) {
	data, _ := models.GetNotice()
	return data
}

func GetSlides() []*models.Slides{
	slides, _ := models.GetAllSlides()
	return slides
}

func GetNewArticles(author int) []*models.Article {
	data, _ := models.GetNewArticle(author)
	return data
}